import json
from collections import defaultdict
from functools import partial, reduce

from submodule.models.codes.dicts import ent_status
from submodule.utils.base62 import wlencode

# 法律服务是否存在 data_stats 字段映射
has_dict = {

}

# 开庭公告
open_court_dict = {

}

# 破产信息
bankrupt = {

}

# 照面
main_dict = {

}

# index 映射
all_dict = {
    'main': main_dict,
    'hasvalue': has_dict,
}

q_and = lambda x, y: x & y
es_nested_dict = {}
main_list = ['main', 'hasvalue']

for es_index_type, es_index_dict in all_dict.items():
    es_nested_dict.update({field: (es_index_type, func) for field, func in es_index_dict.items()})

def legal_service_q(payload_dict):
    temp_nested = defaultdict(list)

    q_list = []

    return q_list